# My nvim config

## Installing without Home Manager

`git clone https://git.sr.ht/~hknd/neovim-config ~/.config/nvim`

If you want to install LSP servers through Mason, you can enable it by setting
`NVIM_ENABLE_MASON=true` in your shell.

## Installing through Home Manager

I throw this into `~/.config/home-manager/editor.nix`:

```nix
{ pkgs, ... }:
{
    programs.neovim = {
        enable = true;
        defaultEditor = true;
        viAlias = true;
        vimAlias = true;
        vimdiffAlias = true;
        withNodeJs = true;
        plugins = with pkgs.vimPlugins; [
            lazy-nvim
        ];
    };
    xdg.configFile.nvim = {
        source = fetchGit {
            url = "https://git.sr.ht/~hknd/neovim-config";
            ref = "master"; rev = "<Preferred revision here>";
        };
    };
}
```

And set this in `~/.config/home-manager/home.nix`:

```nix
# ...
    imports = [
        # ... Your imports
        ./editor.nix
        # ...
    ];
# ...
```

LSP installation happens through Home Manager, servers are added via lspconfig.
